package com.atguigu.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class PaymentController {

    private static final String SERVICE_URL="provider-payment-zk8004";
    @Autowired
    private RestTemplate restTemplate;
    @GetMapping("/get/payment")
    public String getPayment() {

        return restTemplate.getForObject("http://"+SERVICE_URL+"/get/payment",String.class);
    }
}
